<!DOCTYPE html>
<html>
    <head>
    <meta charset="utf-8"/>
	<meta name="description" content="Creating a table with Bootstrap. Learn how to use Bootstrap toolkit to create Tables with examples.">
	<link href="https://cdn.bootcss.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <title>登录成功</title>
    <link rel="stylesheet" type="text/css" href="first.css">
	<script type="text/javascript" src="./jquery-3.3.1.min.js"></script>
	<script src="../Scripts/jquery.js"></script>
<script src="../Scripts/jquery-ui.js"></script>
<script src="../Scripts/jquery-ui.min.js"></script>
	<script type="text/javascript">
	

	$(function check(){
	var m=document.referrer;
	if(m!='https://siriuspotter.gitee.io/fourth_stage_operation/sign_in/sign_in.html')
	{window.location.href='../sign_in/sign_in.html';}
	else
	{$("#info").html(localStorage.getItem("state"));
	creatTable();}
    })

    function creatTable( ){
  var tableData="<tr>"
  for(var i=1;i<localStorage.length;i++){
    var user=localStorage.getItem(i);
	user=JSON.parse(user);
    tableData+="<td>"+user.username+"</td>";
	tableData+="<td>"+user.email+"</td>";
	tableData+="<td>"+user.registertime+"</td>";
	tableData+="<td>"+user.logtime+"</td>";
    tableData+="</tr>";}
  $("#tbody1").html(tableData);
  

}
 $.ajax({type:"GET",   
         url:"https://api.map.baidu.com/location/ip?&ak=iIVqAxNKsDT0UauthpPk1TiA0RBt3aHp&coor=bd09ll", //访问的链接
         dataType:"jsonp",  
		 jsonp:"callback",  
		 success:function(data){  

                $("#address").html("城市："+data.content.address+" 经度："+data.content.point.x+" 纬度："+data.content.point.y);

            },

            error: function (e) {

                alert("error");

            }

        }); 
   </script>
   <style>
img {
    display: block;
    margin: 0 auto;
}
</style>
    </head>
    <body >
        <div><h5 id="info"></h5>
		<h5 id="address"></h5></div>
	
        <header>
            CONGRATULATIONS!
        </header>
    <img src="timg.jpg" class="img-thumbnail" alt="Cinque Terre" width="304" height="236"> 
	<div id="container1">	
	<!-- <table class="table table-striped"> -->
        <!-- <section> -->
            <!-- <h2>登录成功</h2> -->
        <!-- </section> -->
	<!-- <thead> -->
		<!-- <tr> -->
			<!-- <th>username</th> -->
			<!-- <th>E-mailadress</th> -->
			<!-- <th>registerTime</th> -->
			<!-- <th>latest_logtime</th> -->
		<!-- </tr> -->
	<!-- </thead> -->
	<!-- <tbody> -->
		<!-- <tr> -->
			<!-- <td>001</td> -->
			<!-- <td>Rammohan </td> -->
			<!-- <td>Reddy</td> -->
			<!-- <td>A+</td> -->
		<!-- </tr> -->
		<!-- <tr> -->
			<!-- <td>002</td> -->
			<!-- <td>Smita</td> -->
			<!-- <td>Pallod</td> -->
			<!-- <td>A</td> -->
		<!-- </tr> -->
		<!-- <tr> -->
			<!-- <td>003</td> -->
			<!-- <td>Rabindranath</td> -->
			<!-- <td>Sen</td> -->
			<!-- <td>A+</td> -->
		<!-- </tr> -->
	<!-- </tbody> -->
	<!-- </table> -->
	<table class="table table-striped">
	
    
		<thead>
		<tr>
			<th>username</th>
			<th>E-mailadress</th>
			<th>registerTime</th>
			<th>latest_logtime</th>
		</tr>
		<tbody id="tbody1">
	</thead>
    </tbody>
    </table>
	
   
	</body>
</html>